Re: How to persist checkbox selections across recordset pages
am 16.07.2007 20:20:02 von daddywhite
Parag,
If I were you, I would use Javascript to populate a hidden field. So
as they select/deselect values, the hidden field changes. This gets
passed from page to page and then finally when you click delete the
full list of IDs that need deleted are passed to your delete function.
for example: 23,56,78,32
Re: How to persist checkbox selections across recordset pages
am 17.07.2007 20:38:41 von daddywhite
I would use Javascript to grab the value of the hidden variable as you
click the link
so something like
I THINK this will work
Play around with this Idea.
If still struggling, send me the code and i will look over it.
regards
dave
Re: How to persist checkbox selections across recordset pages
am 17.07.2007 20:50:45 von daddywhite
Try:
This should work, or something along these lines anyway.
cheers.
dave.
Re: How to persist checkbox selections across recordset pages
am 18.07.2007 10:26:34 von ParagGaikwad
Thanks for the response dave.
Are you suggesting I should pass the selections as QueryStrings?
Is there any other way to be able to do this other than either submitting
the page on click of Next or Prev button or pssing the values in the
querystrings.
Regards,
Parag
"daddywhite" wrote:
> Try:
>
>
>
> This should work, or something along these lines anyway.
>
> cheers.
> dave.
>
>
Re: How to persist checkbox selections across recordset pages
am 20.07.2007 14:59:41 von daddywhite
Not that I know of - unless you change my function mytester to set a
cookie in javascript, that would work as well I think. Then you would
not be passing data around - simply changing a cookie value.
Ther are plent of article on Javascript and Cookies, just punch
"javascript cookies" inbto google.
Regards
Dave
Re: How to persist checkbox selections across recordset pages
am 20.07.2007 17:44:01 von ParagGaikwad
Thanks once again Dave.
Based on the discussions till now I can see three ways to acheive this
1. Querystrings as explianed by your examples. But this means user can the
see values and Querystring has length limitation (though quite long). However
this will work in all browsers
2. Submit the page on click of Next and Prev buttons. store the selections
in hidden field. This i can pass the data without being visible. Not sure how
much performance impact this may have.
3. Cookies - Again here i think the limit is 4K so not sure how many
selections can be stored and also browser needs to support this.
Can you please let me know which would be best option considering following
criterias
1. Performance
2. Data Security
Thanks and Regards,
Parag
"daddywhite" wrote:
> Not that I know of - unless you change my function mytester to set a
> cookie in javascript, that would work as well I think. Then you would
> not be passing data around - simply changing a cookie value.
> Ther are plent of article on Javascript and Cookies, just punch
> "javascript cookies" inbto google.
>
> Regards
> Dave
>
>
Re: How to persist checkbox selections across recordset pages
am 21.07.2007 11:08:01 von daddywhite
On Jul 20, 4:44 pm, Parag Gaikwad wrote:
> Thanks once again Dave.
> Based on the discussions till now I can see three ways to acheive this
> 1. Querystrings as explianed by your examples. But this means user can the
> see values and Querystring has length limitation (though quite long). However
> this will work in all browsers
> 2. Submit the page on click of Next and Prev buttons. store the selections
> in hidden field. This i can pass the data without being visible. Not sure how
> much performance impact this may have.
> 3. Cookies - Again here i think the limit is 4K so not sure how many
> selections can be stored and also browser needs to support this.
> Can you please let me know which would be best option considering following
> criterias
> 1. Performance
> 2. Data Security
> Thanks and Regards,
> Parag
Submission obviously means that there is no limit to what is stored
Any of these methods would work - yes there are problems with 1 and 3
but it all depends on how many records you expect a user to want to
delete in any one action - if hundreds then dont use querystrings or
cookies. If on a few (less than 40/50) then use any of these methods.
I wouldnt worry about the browser problem with cookies - you can
always check whether they have cookies enabled and if not warn them
and tell them to switch them on - but i dont see how they would get
most websites to work if they have cookies disabled.
Regards
Dave.
Re: How to persist checkbox selections across recordset pages
am 23.07.2007 18:26:04 von ParagGaikwad
Thanks for the response Dave.
I think I would implement one of the following options. However, I am not
100% sure which one to use. Would really appreciate your advice
1. Hiden Field & Submit the Form on click of next and previous button
Pros
- Data is not visible to user
- No storage Limitation
Cons
- Form needs to be submitted resulting some overhead not sure what (main
cause of not being 100% sure)
2. Use cookies to store selection
Pros
- Data is not easily visisble
- Available at client side not sure if boost performance as read write
operation to the cookie file
Cons
- Size limitation. I think t is 4096 bytes or 255 characters.
- The clicking on next button will do saving to cookie and trip to server
though..
Some users might delete more than 50 records...so really bit confused. If I
have to go cookie way then have to restrict users from checking more that say
50 records.
Please let me know your thoughts
Thanks and Regards,
Parag
"daddywhite" wrote:
> On Jul 20, 4:44 pm, Parag Gaikwad
> wrote:
> > Thanks once again Dave.
> > Based on the discussions till now I can see three ways to acheive this
> > 1. Querystrings as explianed by your examples. But this means user can the
> > see values and Querystring has length limitation (though quite long). However
> > this will work in all browsers
> > 2. Submit the page on click of Next and Prev buttons. store the selections
> > in hidden field. This i can pass the data without being visible. Not sure how
> > much performance impact this may have.
> > 3. Cookies - Again here i think the limit is 4K so not sure how many
> > selections can be stored and also browser needs to support this.
> > Can you please let me know which would be best option considering following
> > criterias
> > 1. Performance
> > 2. Data Security
> > Thanks and Regards,
> > Parag
>
> Submission obviously means that there is no limit to what is stored
>
> Any of these methods would work - yes there are problems with 1 and 3
> but it all depends on how many records you expect a user to want to
> delete in any one action - if hundreds then dont use querystrings or
> cookies. If on a few (less than 40/50) then use any of these methods.
>
> I wouldnt worry about the browser problem with cookies - you can
> always check whether they have cookies enabled and if not warn them
> and tell them to switch them on - but i dont see how they would get
> most websites to work if they have cookies disabled.
>
> Regards
> Dave.
>
>
Re: How to persist checkbox selections across recordset pages
am 23.07.2007 19:32:54 von daddywhite
To be honest its down to personal prefernce.
Use whichever you like.
If you want to restrict the user to 50 clicks (or however many) then I
have the code to do that if you wish. Alternatively I suppose you
could javascript to count the characters and if over 200 then disallow
any more selections? I dunno.
If it is truly 255 character limit it depends on the size of the ids
of record you want to delete. For example if an ID is "25678655" then
that uses up more characters than "23" obviosuly!
RE: How to persist checkbox selections across recordset pages